<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        /*
        //函数定义方式一
        function abs(x){
            // if(typeof x!='number'){
            //     throw 'not a number';
            // }
            console.log("x=>"+x);
            for( let  i=0;i<arguments.length;i++){
                console.log(arguments[i]);
            }
            if(x>=0){
                return x;
            }else {
                return -x;
            }
        }
        //函数定义方式二
        let absII = function (x) {
            if (x >= 0) {
                return x;
            } else {
                return -x;
            }
        };

        */
        function ab(a,b,...rest){
            console.log("a=>"+a);
            console.log("b=>"+b);
            console.log(rest);
        }



    </script>
</head>
<body>

</body>
</html>